gtk.cfg: Fix gtk_widget_destroy definition and usage#8546
Conversation
|
Please add a (simple) example using |
5d43e32 to
435e7b4
Compare
Done. I also removed duplicate definition of |
|
The value of |
435e7b4 to
b3bad5f
Compare
I wasn't notified for the CI failure, sorry. (err: now I am :)) |
b3bad5f to
b4da3c5
Compare
danmar
left a comment
There was a problem hiding this comment.
I am no expert but when I ask chatgpt it says:
GTK 3
Using gtk_widget_destroy() is standard and commonly used.GTK 4
GTK 4 documentation removed gtk_widget_destroy(). In GTK 4, widgets are generally disposed of by:
- Removing them from their parent, or
- Calling g_object_unref() if you own an extra reference
As I interpret it, this change might cause false positives for regular fine GTK 4 code.
gtk_widget_destroy is only for GtkWidget derived objects, and in practice should only be used for GtkWindow derived widgets (it is replaced with gtk_window_destroy in gtk4).
b4da3c5 to
0605fae
Compare
Yes you're right, I added the definition of |
|
Oh wait, we'll have another issue: Should we really add a test for |
gtk_widget_destroy is only for GtkWidget derived objects.